package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.entity.AbdulBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 库存报损 Entity
 *
 * @author ruoyi
 * @date 2025-06-04
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel("库存报损信息")
@Data
@TableName("inv_reporting_losses")
public class InvReportingLosses extends AbdulBaseEntity {

    @ApiModelProperty(value = "主键ID", example = "1")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "报损单号", example = "BL20250604001")
    private String reportLossNumber;

    @ApiModelProperty(value = "报损仓库ID（关联 warehouse 表）", required = true, example = "1001")
    private Long warehouseId;

    @ApiModelProperty(value = "报损类型（绑定 store_business 表）", example = "2001")
    private Long storeBusinessId;

    @ApiModelProperty(value = "报损时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lossesTime;

    @ApiModelProperty(value = "报损员工", example = "张三")
    private String lossesStaff;

    @ApiModelProperty(value = "状态(1-待审核，2-已审核)", example = "1")
    private Integer isStatus;

    @ApiModelProperty("审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;



    //DTO
    @ApiModelProperty("创建开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date createTimeStart;

    @ApiModelProperty("创建结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date createTimeEnd;

    @ApiModelProperty("报损开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date lossesTimeStart;

    @ApiModelProperty("报损结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date lossesTimeEnd;

    @ApiModelProperty("仓库名称")
    @TableField(exist = false)
    private String warehouseName;

    @ApiModelProperty("报损类型名称")
    @TableField(exist = false)
    private String storeBusinessName;

    @ApiModelProperty("报损商品详情列表")
    @TableField(exist = false)
    List<InvInventoryTransferDetail> detailList;
}
